﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.ServiceModel.Web;

namespace RemoteHardwareMonitor
{
    [ServiceContract]
    interface IHardwareMonSrvce
    {
        // JSON encoding: http://www.west-wind.com/weblog/posts/164419.aspx
        [OperationContract]
        [WebGet(ResponseFormat=WebMessageFormat.Json)]
        string GetCPUName(int cpu);

        [OperationContract]
        [WebGet]
        int GetCPUCount();

        [OperationContract]
        [WebGet(ResponseFormat = WebMessageFormat.Json)]
        string GetCPUCountJ();

        [OperationContract]
        [WebGet]
        float GetCPULoad(int cpu);

        [OperationContract]
        [WebGet]
        int GetCoreCount(int cpu);

        [OperationContract]
        [WebGet(ResponseFormat = WebMessageFormat.Json)]
        string GetCoreCountJ(int cpu);

        [OperationContract]
        [WebGet(ResponseFormat = WebMessageFormat.Xml)]
        float GetCoreLoad(int cpu, int core);

        [OperationContract]
        [WebGet(ResponseFormat = WebMessageFormat.Json)]
        string GetCoreLoadJ(int cpu, int core);

        [OperationContract]
        [WebGet(ResponseFormat = WebMessageFormat.Json)]
        string GetAllCoreDataJ(int cpu);

        [OperationContract]
        [WebGet(ResponseFormat = WebMessageFormat.Json)]
        float GetCoreTemperature(int cpu, int core);

        [OperationContract]
        [WebGet]
        string GetGPUName(int gpu);

        [OperationContract]
        [WebGet]
        int GetGPUCount();

        [OperationContract]
        [WebGet(ResponseFormat = WebMessageFormat.Json)]
        string GetGPUCountJ();

        [OperationContract]
        [WebGet]
        float GetGPULoad(int gpu);

        [OperationContract]
        [WebGet]
        double GetGPULoadMax(int gpu);

        [OperationContract]
        [WebGet]
        float GetGPUTemperature(int gpu);

        [OperationContract]
        [WebGet(ResponseFormat = WebMessageFormat.Json)]
        string GetAllGPUDataJ(int gpu);

    }
}
